\(\int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx\) [856]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [C] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 27, antiderivative size = 33 \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=-\frac {\sqrt {2} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {b} \sqrt {-x}}{\sqrt {2}}\right ),-1\right )}{\sqrt {b}} \]

[Out]

-EllipticF(1/2*b^(1/2)*(-x)^(1/2)*2^(1/2),I)*2^(1/2)/b^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {117} \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=-\frac {\sqrt {2} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {b} \sqrt {-x}}{\sqrt {2}}\right ),-1\right )}{\sqrt {b}} \]

[In]

Int[1/(Sqrt[-x]*Sqrt[2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

-((Sqrt[2]*EllipticF[ArcSin[(Sqrt[b]*Sqrt[-x])/Sqrt[2]], -1])/Sqrt[b])

Rule 117

Int[1/(Sqrt[(b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]*Sqrt[(e_) + (f_.)*(x_)]), x_Symbol] :> Simp[(2/(b*Sqrt[e]))*Rt
[-b/d, 2]*EllipticF[ArcSin[Sqrt[b*x]/(Sqrt[c]*Rt[-b/d, 2])], c*(f/(d*e))], x] /; FreeQ[{b, c, d, e, f}, x] &&
GtQ[c, 0] && GtQ[e, 0] && (PosQ[-b/d] || NegQ[-b/f])

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {2} F\left (\left .\sin ^{-1}\left (\frac {\sqrt {b} \sqrt {-x}}{\sqrt {2}}\right )\right |-1\right )}{\sqrt {b}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 10.03 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.88 \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {x \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},\frac {b^2 x^2}{4}\right )}{\sqrt {-x}} \]

[In]

Integrate[1/(Sqrt[-x]*Sqrt[2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

(x*Hypergeometric2F1[1/4, 1/2, 5/4, (b^2*x^2)/4])/Sqrt[-x]

Maple [A] (verified)

Time = 1.80 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.03

method result size
default \(\frac {F\left (\frac {\sqrt {b x +2}\, \sqrt {2}}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {-b x}}{\sqrt {-x}\, b}\) \(34\)
elliptic \(\frac {\sqrt {x \left (b^{2} x^{2}-4\right )}\, \sqrt {2}\, \sqrt {b \left (x +\frac {2}{b}\right )}\, \sqrt {-b \left (x -\frac {2}{b}\right )}\, \sqrt {-2 b x}\, F\left (\frac {\sqrt {2}\, \sqrt {b \left (x +\frac {2}{b}\right )}}{2}, \frac {\sqrt {2}}{2}\right )}{2 \sqrt {-x}\, \sqrt {-b x +2}\, \sqrt {b x +2}\, b \sqrt {b^{2} x^{3}-4 x}}\) \(106\)

[In]

int(1/(-x)^(1/2)/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

EllipticF(1/2*(b*x+2)^(1/2)*2^(1/2),1/2*2^(1/2))*(-b*x)^(1/2)/(-x)^(1/2)/b

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.07 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.39 \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {2 \, {\rm weierstrassPInverse}\left (\frac {16}{b^{2}}, 0, x\right )}{b} \]

[In]

integrate(1/(-x)^(1/2)/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="fricas")

[Out]

2*weierstrassPInverse(16/b^2, 0, x)/b

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 92 vs. \(2 (31) = 62\).

Time = 11.48 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.79 \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\frac {\sqrt {2} {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {1}{2}, 1, 1 & \frac {3}{4}, \frac {3}{4}, \frac {5}{4} \\\frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4} & 0 \end {matrix} \middle | {\frac {4}{b^{2} x^{2}}} \right )}}{8 \pi ^{\frac {3}{2}} \sqrt {b}} - \frac {\sqrt {2} {G_{6, 6}^{3, 5}\left (\begin {matrix} - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4} & 1 \\0, \frac {1}{2}, 0 & - \frac {1}{4}, \frac {1}{4}, \frac {1}{4} \end {matrix} \middle | {\frac {4 e^{- 2 i \pi }}{b^{2} x^{2}}} \right )}}{8 \pi ^{\frac {3}{2}} \sqrt {b}} \]

[In]

integrate(1/(-x)**(1/2)/(-b*x+2)**(1/2)/(b*x+2)**(1/2),x)

[Out]

sqrt(2)*meijerg(((1/2, 1, 1), (3/4, 3/4, 5/4)), ((1/4, 1/2, 3/4, 1, 5/4), (0,)), 4/(b**2*x**2))/(8*pi**(3/2)*s
qrt(b)) - sqrt(2)*meijerg(((-1/4, 0, 1/4, 1/2, 3/4), (1,)), ((0, 1/2, 0), (-1/4, 1/4, 1/4)), 4*exp_polar(-2*I*
pi)/(b**2*x**2))/(8*pi**(3/2)*sqrt(b))

Maxima [F]

\[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\int { \frac {1}{\sqrt {b x + 2} \sqrt {-b x + 2} \sqrt {-x}} \,d x } \]

[In]

integrate(1/(-x)^(1/2)/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(b*x + 2)*sqrt(-b*x + 2)*sqrt(-x)), x)

Giac [F]

\[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\int { \frac {1}{\sqrt {b x + 2} \sqrt {-b x + 2} \sqrt {-x}} \,d x } \]

[In]

integrate(1/(-x)^(1/2)/(-b*x+2)^(1/2)/(b*x+2)^(1/2),x, algorithm="giac")

[Out]

integrate(1/(sqrt(b*x + 2)*sqrt(-b*x + 2)*sqrt(-x)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {-x} \sqrt {2-b x} \sqrt {2+b x}} \, dx=\int \frac {1}{\sqrt {-x}\,\sqrt {2-b\,x}\,\sqrt {b\,x+2}} \,d x \]

[In]

int(1/((-x)^(1/2)*(2 - b*x)^(1/2)*(b*x + 2)^(1/2)),x)

[Out]

int(1/((-x)^(1/2)*(2 - b*x)^(1/2)*(b*x + 2)^(1/2)), x)